home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / M / M2TSkel.cpt / M2TSkel / MultiSkelGlobals.mod / MultiSkelGlobals.mod
Encoding:
Modula Implementation  |  1986-04-14  |  1.0 KB  |  55 lines  |  [TEXT/MPS ]

  1. IMPLEMENTATION MODULE MultiSkelGlobals;
  2.  
  3. FROM QuickDraw IMPORT RgnHandle, NewRgn, GetClip, SetClip, DisposeRgn,
  4.                                             ClipRect, Rect;
  5. FROM WindowManager IMPORT WindowPtr, DrawGrowIcon;
  6.  
  7.  
  8. (*
  9.  *    Miscellaneous routines.
  10.  *        These take care of drawing the frow box and the line along the right
  11.  *        edge of the window, and of setting and resetting the clip region to
  12.  *        disallow drawing in that right edge by the other drawing routines.
  13.  *)
  14.  
  15. PROCEDURE DrawGrowBox(wind: WindowPtr);
  16.  
  17.     VAR
  18.         r: Rect;
  19.         oldClip: RgnHandle;        (* Different from the global oldClip *)
  20.  
  21. BEGIN
  22.     r := wind^.portRect;
  23.     r.left := r.right-15;
  24.     oldClip := NewRgn();
  25.     GetClip(oldClip);
  26.     ClipRect(r);
  27.     DrawGrowIcon(wind);
  28.     SetClip(oldClip);
  29.     DisposeRgn(oldClip);
  30. END DrawGrowBox;
  31.  
  32.  
  33. PROCEDURE SetWindClip(wind: WindowPtr);
  34.  
  35.     VAR
  36.         r: Rect;
  37.  
  38. BEGIN
  39.     r := wind^.portRect;
  40.     DEC(r.right, 15);
  41.     oldClip := NewRgn();
  42.     GetClip(oldClip);
  43.     ClipRect(r);
  44. END SetWindClip;
  45.  
  46.  
  47. PROCEDURE ResetWindClip;
  48.  
  49. BEGIN
  50.     SetClip(oldClip);
  51.     DisposeRgn(oldClip);
  52. END ResetWindClip;
  53.  
  54. END MultiSkelGlobals.
  55.